#ifndef MOVERSELECTION_H
#define MOVERSELECTION_H

#include "GraphicsArea/tooleffect.h"
#include "selectionrect.h"

class DrawingArea;


class MoverSelection : public ToolEffect
{
public:
    //************************************************************* MoverSelection
    MoverSelection(DrawingArea* drawingAreaUse,QDockWidget* dockInfoTool,int XBeginSelection,int XEndSelection,int YBeginSelection,int YEndSelection);
    //************************************************************* Affichage of Dock Tool Info
    void createAffichage();
    //************************************************************* MoverSelection movement
    void initMoveSelection(int x, int y);
    void movingSelection(int x, int y);
    void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
    void endMoverSelection();
    //************************************************************* Variables
    DrawingArea* drawingAreaUseMoverSelection;

    int XBeginVraiSelection, YBeginVraiSelection, largeurVraiSelection, hauteurVraiSelection;
    int XBeginVraiSelectionDansLayer, YBeginVraiSelectionDansLayer, largeurVraiSelectionDansLayer, hauteurVraiSelectionDansLayer;

    int distanceX,distanceY;

    int XDeplace, YDeplace;

    bool dejaDeplace;

    Layer* layerToMove;
    QImage* imageMoverSelection;

    bool isMover;
};
#endif // MOVERSELECTION_H
